import { ApiProperty } from '@nestjs/swagger'
import { IsNotEmpty, IsString, Matches, MinLength } from 'class-validator'

export class UpdateStudentPasswordDto {
  @ApiProperty({ description: '新密码' })
  @IsString()
  @IsNotEmpty()
  @Matches(/^\S*(?=\S{6})(?=\S*\d)(?=\S*[A-Z])\S*$/i, {
    message: '密码必须包含数字、字母，长度为6-16',
  })
  @MinLength(6)
  password: string
} 